<html>
<head><title>Object Referencing</title></head>
<body>
<script language="JavaScript">
function start()
{
alert(pText.innerText);
pText.innerText="Thanks for coming";
}
</script>
</head>
<body onload="start()">
<p id="pText">Welcome to Home page</p>
</body>
</html>